<div class="row">
<script language="javascript" type="text/javascript" src="/js/DatePicker/WdatePicker.js"></script>
<style type="text/css">
.Wdate{border:0px; }
</style>
<div class="span3 bs-docs-sidebar ">
<*include file="<*$controller*>/location.tpl"*>
</div>

<div class="span9">
        <div class="span9" style="text-align:left; margin-top:10px;padding-bottom:10px; clear:both">
             <form action="/<*$controller*>/onlinestatistics" method="get" >   
		    		<select id="jigou" name="groups"  ></select>&nbsp;&nbsp;
                    开始日期：<input type="text" class="Wdate" id="start_date" onclick="WdatePicker()" style="width:110px"  name="start_date" class="Wdate" value="<*$start_date*>" autocomplete="off"/> 
                   ~  结束日期：<input type="text" class="Wdate" id="end_date" onclick="WdatePicker()" style="width:110px"  name="end_date" class="Wdate" value="<*$end_date*>" autocomplete="off"/>  &nbsp;&nbsp;
                   <button type="submit" style="margin-bottom:10px;" class="btn btn-primary" >查询</button>
             </form>     
        </div>  
        <div class="span7"> 
            <table class="table table-bordered table-hover"  >
                <tr><th>序号</th><th>集团机构</th><th>学校名称</th><th>教师数</th><th>教师上线数</th><th>上线率</th><th>学生数</th><th>学生上线数</th><th>上线率</th><!--th>&nbsp;</th--></tr>
                <*foreach from=$student item=item key=key name=foo*>
                <tr><td><*$smarty.foreach.foo.iteration*></td><td><*$item.groupname*></td><td><*$item.schoolname*></td><td><*$item.teacher*></td><td><*if $item.online_class*><*$item.online_class*><*else*>0<*/if*></td><td><*$item.online_class_lv*></td><td><*$item.student*></td><td><*if $item.online_student*><*$item.online_student*><*else*>0<*/if*></td><td><*$item.online_student_lv*></td></td><!--td><a href="/<*$controller*>/see/id/<*$item.schoolid*>"><i class="icon-info-sign"></i> 查看</a></td--></tr>
                <*/foreach*>
            </table>
        </div>
</div>

 
</div>
<script type="text/javascript"> 
       function   ajax_post(){ 
	    var groupsid="<*$groups*>"; 
        $.post("/<*$controller*>/groups/",{"jigouid":groupsid},function(data,statusText){ 
			 $("#jigou").append(data); 
        });  
	 } 
	  
	  $("#jigou").change(function(){
           // $("#city option:gt(0)").remove();  //清空所有城市的信息
            //$("#county option:gt(0)").remove();  //清空所有县级的信息
            var id = this.value;
			var schoolid="<*$schoolid*>";  
			  
            $.post("/<*$controller*>/schoollist/",{"id":id,"sid":schoolid},function(data,statusText){
                 $("#school").html('');
                 $("#school").append(data);
            
            });
        });
		
		$("#school").change(function(){
           // $("#city option:gt(0)").remove();  //清空所有城市的信息
            //$("#county option:gt(0)").remove();  //清空所有县级的信息
            var sid = this.value; 
            $.post("/<*$controller*>/classlist/",{"id":sid},function(data,statusText){
				 
                 $("#class1").html('');
                 $("#class1").append(data);
            
            });
        });
		
	
	 window.onload=function(){
	    ajax_post(); 
	 if( '<*$groups*>'+0 != 0 ){ 
	        
			var id = '<*$groups*>'; 
			var sid = '<*$schoolid*>';  
			 
			$.post("/<*$controller*>/schoollist/",{"id":id,"sid":sid},function(data,statusText){
				 $("#school").html('');
				 $("#school").append(data); 
				});
	    } 
          
	 if('<*$schoolid*>'+0 != 0){   
		   var id = '<*$schoolid*>'; 
		   var cid='<*$classid*>';
			$.post("/<*$controller*>/classlist/",{"id":id,"cid":cid},function(data,statusText){ 
				 $("#class1").html('');
				 $("#class1").append(data); 
				}); 
		   
	 }/* */

 } 
	
function chooseit(schoolid,groupid,start,end)
{
   window.location='/<*$controller*>/statisclass/schoolid/'+schoolid+'/groupid/'+groupid+'/start_date/'+start+'/end_date/'+end;
}
	  
</script> 

